import request from '@/utils/request'

export default {

  //获取通知List
  getNoticeList(current, limit, noticeQuery) {
    return request({
      url: `/intern/notice/list/${current}/${limit}`,
      method: 'post',
      data: noticeQuery
    })
  },

  //通过通知id获取对应通知
  getNoticeInfo(id) {
      return request({
          url: `/intern/notice/info/${id}`,
          method: "get"
      })
  },

  //通过ID删除
  deleteNotice(id) {
      return request({
          url: `/intern/notice/delete/${id}`,
          method: "delete"
      })
  },

  //SaveOrUpdate
  saveOrUpdate(notice) {
      return request({
          url: `/intern/notice/saveOrUpdate`,
          method: 'post',
          data: notice
      })
  },

  toUndercarriage(id) {
    return request({
      url: `/intern/notice/toUndercarriage/${id}`,
      method: 'get'
    })
  },

  toIssue(id) {
    return request({
      url: `/intern/notice/toIssue/${id}`,
      method: 'get'
    })
  }

}